/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.awt.geom.Point2D;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import java.util.regex.Pattern;
/*     */ import org.lwjgl.input.Keyboard;
/*     */ import org.yaml.snakeyamla.configuration.ConfigurationSection;
/*     */ import org.yaml.snakeyamla.configuration.file.YamlConfiguration;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class fba
/*     */ {
/*     */   public int f;
/*     */   public String s;
/*     */   public int m;
/*     */   public String l;
/*     */   public String t;
/*     */   public String d;
/*     */   public List<gy> z;
/*     */   public List<String> i;
/*     */   public List<String> w;
/*     */   public Pattern q;
/*     */   private cz g;
/*     */   
/*     */   public fba(YamlConfiguration yamlConfiguration) {
/*  29 */     this.f = yamlConfiguration.getInt("setting.shifttype");
/*  30 */     this.s = yamlConfiguration.getString("setting.match", "unknow");
/*  31 */     this.m = yamlConfiguration.getInt("setting.priority");
/*  32 */     this.l = String.valueOf(yamlConfiguration.get("setting.width", "0"));
/*  33 */     this.t = String.valueOf(yamlConfiguration.get("setting.move", "0"));
/*  34 */     this.d = String.valueOf(yamlConfiguration.get("setting.height", "0"));
/*  35 */     if (this.s.equals("*")) {
/*  36 */       this.s = ".*";
/*     */     }
/*  38 */     this.q = Pattern.compile(this.s);
/*     */     
/*  40 */     this.i = yamlConfiguration.getStringList("Lines");
/*  41 */     this.w = yamlConfiguration.getStringList("Lores");
/*  42 */     this.z = new ArrayList<>();
/*  43 */     for (ConfigurationSection configurationSection : yamlConfiguration.getSections()) {
/*  44 */       String str = configurationSection.getString("type");
/*  45 */       if ("texture".equalsIgnoreCase(str)) {
/*  46 */         this.z.add(new ct(configurationSection)); continue;
/*  47 */       }  if ("text".equalsIgnoreCase(str)) {
/*  48 */         this.z.add(new sx(configurationSection)); continue;
/*  49 */       }  if ("model".equalsIgnoreCase(str)) {
/*  50 */         this.z.add(new vw(configurationSection)); continue;
/*  51 */       }  if ("color".equalsIgnoreCase(str)) {
/*  52 */         this.z.add(new zu(configurationSection));
/*     */       }
/*     */     } 
/*     */   }
/*     */   
/*     */   public void v(cz cz1) {
/*  58 */     this.g = cz1;
/*  59 */     for (gy gy : this.z) {
/*  60 */       gy.v(cz1);
/*     */     }
/*     */   }
/*     */   
/*     */   public double h() {
/*  65 */     return this.g.v(this.t);
/*     */   }
/*     */   
/*     */   public double z() {
/*  69 */     return this.g.v(this.l);
/*     */   }
/*     */   
/*     */   public double v() {
/*  73 */     return this.g.v(this.d);
/*     */   }
/*     */   
/*     */   public Point2D.Float z(int i) {
/*  77 */     if (i < this.i.size()) {
/*  78 */       String[] arrayOfString = ((String)this.i.get(i)).split(",");
/*  79 */       if (arrayOfString.length == 2) {
/*  80 */         float f1 = (float)this.g.v(arrayOfString[0].replace("i", String.valueOf(i)));
/*  81 */         float f2 = (float)this.g.v(arrayOfString[1].replace("i", String.valueOf(i)));
/*  82 */         return new Point2D.Float(f1, f2);
/*     */       } 
/*     */     } 
/*  85 */     return new Point2D.Float(999.0F, 999.0F);
/*     */   }
/*     */   public Point2D.Float v(int i) {
/*  88 */     if (i < this.w.size()) {
/*  89 */       String[] arrayOfString = ((String)this.w.get(i)).split(",");
/*  90 */       if (arrayOfString.length == 2) {
/*  91 */         float f1 = (float)this.g.v(arrayOfString[0].replace("i", String.valueOf(i)));
/*  92 */         float f2 = (float)this.g.v(arrayOfString[1].replace("i", String.valueOf(i)));
/*  93 */         return new Point2D.Float(f1, f2);
/*     */       } 
/*     */     } 
/*  96 */     return new Point2D.Float(999.0F, 999.0F);
/*     */   }
/*     */   
/*     */   public boolean v() {
/* 100 */     boolean bool = (Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54));
/*     */     
/* 102 */     if (this.f == 1 && bool) {
/* 103 */       return false;
/*     */     }
/* 105 */     if (this.f == 2 && !bool) {
/* 106 */       return false;
/*     */     }
/* 108 */     return true;
/*     */   }
/*     */   
/*     */   public int v() {
/* 112 */     return this.m;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\fba.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */